@import 'nib'

// Assignee, code copied from wekan/client/users/userAvatar.styl

avatar-radius = 50%

#cardURL_copy
  // Have clipboard text not visible by moving it to far left
  position: absolute
  left: -2000px
  top: 0px

#clipboard
  white-space: normal

.assignee
  border-radius: 3px
  display: block
  position: relative
  float: left
  height: 30px
  width: @height
  margin: 0 4px 4px 0
  cursor: pointer
  user-select: none
  z-index: 1
  text-decoration: none
  border-radius: avatar-radius

  .avatar
    overflow: hidden
    border-radius: avatar-radius

    &.avatar-assignee-initials
      height: 70%
      width: @height
      padding: 15%
      //--------------------------------------wannnna
      //background-color: #dbdbdb
      //color: #444444
      background-color: #DCF4E3
      color: #219451
      position: absolute

    &.avatar-image
      object-fit: cover;
      object-position: center;
      height: 100%
      width: @height

  .assignee-presence-status
    background-color: #b3b3b3
    border: 1px solid #fff
    border-radius: 50%
    height: 7px
    width: @height
    position: absolute
    right: -1px
    bottom: -1px
    border: 1px solid white
    z-index: 15

    &.active
      background: #64c464
      border-color: #daf1da

    &.idle
      background: #e4e467
      border-color: #f7f7d4

    &.disconnected
      background: #bdbdbd
      border-color: #ededed

    &.pending
      background: #e44242
      border-color: #f1dada



  &.add-assignee
    display: flex
    align-items: center
    justify-content: center
    background-color: rgba(9,30,66,.04)

    &:hover, &.is-active
      background-color: rgba(9,30,66,.08)

// Other card details

.card-details
  padding: 0
  flex-shrink: 0
  //flex-basis: 600px
  //-------------------------------------------------wannnna
  flex-basis: 875px

  will-change: flex-basis
  overflow-y: scroll
  overflow-x: hidden
  background: darken(white, 3%)
  border-radius: bottom 3px
  z-index: 20 !important
  animation: flexGrowIn 0.1s
  box-shadow: 0 0 7px 0 darken(white, 30%)
  transition: flex-basis 0.1s
  box-sizing: border-box
  height:84.5vh
  // transition: all .5s
  .card-content-box
    width: 100%
    display: flex
    flex-direction: row-reverse
    box-sizing: border-box
    padding: 15px
    position relative
    .toggle-toolbar
      display: block;
      padding: 10px;
      top: -8px;
      right: 198px;
      position: absolute;
      transform: rotate(90deg);
      transition: all .3s;
      cursor: pointer

  .card-content-box-main
    flex: 1
    display: flex
    flex-direction: column
    margin-right: 28px
    transition: margin-right .3s
  .card-content-box-toolbar
    width: 168px
    min-height: 100vh
    box-sizing: border-box
    transition: all .3s
    .tool-title
      display: block;
      color: #5e6c84;
      font-size: 12px;
      font-weight: 500;
      letter-spacing: .04em;
      padding: 10px 0;
      :nth-child(2)
        margin-top: 10px;

    .toolbar-btn
      width: 100%
      height: 32px
      margin: 4px 0
      background: #f1f1f4
      border-radius: 3px
      text-align: left
      font-size: 14px;
      font-weight: 400;
      color: #42526e;
      padding: 0 16px;
      white-space: nowrap;
      vertical-align: middle;
      line-height: 32px;
      box-sizing: border-box
      position: relative
      //box-shadow: none

      &:hover
        color: #333;
        background-color: #e6e6e6;
        //border: 1px solid #adadad;
      .toolbar-btn-icon
        margin-right: 6px
        &:before
          vertical-align: middle
  .mCustomScrollBox
    padding-left: 0

  .card-details-canvas
    width: auto
    //padding: 0 20px

  .card-details-header
    //margin: 0 -20px 5px
    //-------------------------------------------------wannnna
    margin: 0 -5px 5px
    padding: 7px 20px
    //background: darken(white, 7%)
    //-------------------------------------------------wannnna
    background: #F0F0F0
    border-bottom: 1px solid darken(white, 14%)

    .close-card-details,
    .maximize-card-details,
    .minimize-card-details,
    .card-details-menu,
    .card-copy-button,
    .card-copy-mobile-button,
    .close-card-details-mobile-web,
    .card-details-menu-mobile-web
      float: right

    .close-card-details,
    .maximize-card-details,
    .minimize-card-details
      font-size: 24px
      padding: 5px 10px 5px 10px
      margin-right: -8px

    .close-card-details-mobile-web
      font-size: 24px
      padding: 5px
      margin-right: 40px

    .card-copy-button
      font-size: 17px
      padding: 10px
      margin-right: 10px

    .card-copy-mobile-button
      font-size: 17px
      padding: 10px
      margin-right: 10px

    .card-details-menu
      font-size: 17px
      padding: 10px

    .card-details-menu-mobile-web
      font-size: 17px
      padding: 10px
      margin-right: 30px

    .card-details-watch
      font-size: 17px
      padding-left: 7px
      color: #a6a6a6

    .card-details-title
      font-weight: bold
      font-size: 1.33em
      margin: 7px 0 0
      padding: 0

    .linked-card-location
      font-style: italic
      font-size: 1em
      margin-bottom: 0
      & p
        margin-bottom: 0

    form.inlined-form
      margin-top: 5px
      margin-bottom: 10px

    .card-details-list
      font-size: 0.85em
      margin-bottom: 3px

      a.card-details-list-title
        font-weight: bold

        &.is-editable
          display: inline-block
          background: darken(white, 10%)
          border-radius: 3px
          padding: 0px 5px

  .card-description textarea
    min-height: 100px
    box-shadow: inset 1px 1px 10px 0 rgba(0,0,0,0.25);
  .viewer-c
    box-shadow: inset 1px 1px 10px 0 rgba(0,0,0,0.25);
    min-height: 100px
    background-color: rgba(9,30,66,.04)
    border-radius: 3px
    padding: 8px 12px;
    box-sizing: border-box;
    &:hover
      background-color: rgba(9,30,66,.08);
  .viewer-c1
    font-size: 14px;
    font-weight: 500;
    color: #172b4d;
    letter-spacing: 0.04em;
    padding: 0 0 10px;

  .card-details-items
    display: flex
    flex-wrap: wrap
    padding-left: 35px
    //margin: 15px 0

    .card-details-item
      margin-right: 0.5em
      &:last-child
        margin-right: 0
      &.card-details-item-labels
        display: block
        word-wrap: break-word
        max-width: 100%
        flex-grow: 1
      &.card-details-item-members
        display: block
        word-wrap: break-word
        max-width: 52%
        flex-grow: 1
      &.card-details-item-customfield,
      &.card-details-item-name
        display: block
        word-wrap: break-word
        max-width: 36%
        flex-grow: 1
      &.card-details-item-assignees
        display: block
        word-wrap: break-word
        max-width: 32%
        flex-grow: 1
      &.card-details-item-received,
      &.card-details-item-start,
      &.card-details-item-due,
      &.card-details-item-end
        display: block
        word-wrap: break-word
        max-width: 28%
        flex-grow: 1
      &.card-details-item-creator
        display: block
        word-wrap: break-word
        max-width: 14%
        flex-grow: 1
  .card-details-item-title
    font-size: 20px;
    font-weight: 600;
    color: #172b4d
    letter-spacing:.04em
    padding:10px 0
    display: flex;
    align-items: center;
    .c-title-icon
      font-size: 24px
      margin-right: 10px;

  .card-details-item-title-1
    font-size: 12px
    font-weight: 500
    color: #5e6c84
    letter-spacing:.04em
    padding:10px 0
  .card-label
    padding-top: 5px
    padding-bottom: 5px

  .activities
    padding-top: 10px


.c-watch
  position: absolute
  right: 6px
  top: 6px
  width: 20px
  height: 20px
  line-height: 20px
  background-color: #61bd4f
  border-radius: 3px;
  font-size: 16px;
  font-weight: 400;
  box-sizing: border-box
  display: flex  !important
  justify-content: center
  align-items: center
  &:before
    color: white

.card-details-maximized
  z-index: 100 !important;
  position: fixed;
  top: 0px;
  height: 100vh;
  left: 0px;
  right: 0px;
  // padding: 0
  // flex-shrink: 0
  // flex-basis: calc(100% - 20px)
  // will-change: flex-basis
  // overflow-y: scroll
  // overflow-x: scroll
  // background: darken(white, 3%)
  // border-radius: bottom 3px
  // z-index: 1000 !important
  // animation: flexGrowIn 0.1s
  // box-shadow: 0 0 7px 0 darken(white, 30%)
  // transition: flex-basis 0.1s
  // box-sizing: border-box
  // position: absolute
  // top: 0
  // left: 0
  // height: calc(100% - 20px)
  // width: calc(100% - 20px)
  // float: left



  // .card-details-left
  //   position: absolute
  //   float: left
  //   top: 60px
  //   left: 20px
  //   width: 47%

  // .card-details-right
  //   position: absolute
  //   float: right
  //   top: 20px
  //   left: 50%

  // .card-details-header
  //   width: 47%

input[type="text"].attachment-add-link-input
  float: left
  margin: 0 0 8px
  width: 80%

input[type="submit"].attachment-add-link-submit
  float: left
  margin: 0 0 8px 4px
  padding: 6px 12px
  width: 18%

@media screen and (max-width: 800px)
  .card-details
    width: calc(100% - 1px)
    //----------------------------wannnna
    //padding: 0px 20px 0px 20px
    margin: 0px
    transition: none
    height:100%

    .card-content-box
      .toggle-toolbar
        display: none!important
    .card-details-canvas
      width: 100%
      padding-left: 0px

    .card-details-header
      .close-card-details
        margin-right: 0px
      .card-details-menu-mobile-web
        margin-right: 10px
      .card-details-menu
        margin-right: 10px

      .maximize-card-details
        margin-right: 10px
      .close-card-details-mobile-web
        margin-right: 10px
      .minimize-card-details
        margin-right: 10px
    .toggle-toolbar
      display: none
    .card-content-box-toolbar
      display: none
    .card-content-box-main
      margin: 0
      .card-details-items
        padding-left: 0
      .des-box
        padding:0 0 10px 0!important;
      .attachments-galery
        margin: 0
      .card-details-item-title
        font-size: 15px;
      .vote-title h3
        font-size: 15px;
      .poker-title h3
        font-size: 15px;
card-details-color(background, color...)
  background: background !important
  if color
    color: color !important //overwrite text for better visibility

.card-details-white
  card-details-color(unset, #000) //Black text for better visibility
  border: 1px solid #eee

.card-details-green
  card-details-color(#3cb500, #ffffff) //White text for better visibility

.card-details-yellow
  card-details-color(#fad900, #000) //Black text for better visibility

.card-details-orange
  card-details-color(#ff9f19, #000) //Black text for better visibility

.card-details-red
  card-details-color(#eb4646, #ffffff) //White text for better visibility

.card-details-purple
  card-details-color(#a632db, #ffffff) //White text for better visibility

.card-details-blue
  card-details-color(#0079bf, #ffffff) //White text for better visibility

.card-details-pink
  card-details-color(#ff78cb, #000) //Black text for better visibility

.card-details-sky
  card-details-color(#00c2e0, #ffffff) //White text for better visibility

.card-details-black
  card-details-color(#4d4d4d, #ffffff) //White text for better visibility

.card-details-lime
  card-details-color(#51e898, #000) //Black text for better visibility

.card-details-silver
  card-details-color(#c0c0c0, #000) //Black text for better visibility

.card-details-peachpuff
  card-details-color(#ffdab9, #000) //Black text for better visibility

.card-details-crimson
  card-details-color(#dc143c, #ffffff) //White text for better visibility

.card-details-plum
  card-details-color(#dda0dd, #000) //Black text for better visibility

.card-details-darkgreen
  card-details-color(#006400, #ffffff) //White text for better visibility

.card-details-slateblue
  card-details-color(#6a5acd, #ffffff) //White text for better visibility

.card-details-magenta
  card-details-color(#ff00ff, #ffffff) //White text for better visibility

.card-details-gold
  card-details-color(#ffd700, #000) //Black text for better visibility

.card-details-navy
  card-details-color(#000080, #ffffff) //White text for better visibility

.card-details-gray
  card-details-color(#808080, #ffffff) //White text for better visibility

.card-details-saddlebrown
  card-details-color(#8b4513, #ffffff) //White text for better visibility

.card-details-paleturquoise
  card-details-color(#afeeee, #000) //Black text for better visibility

.card-details-mistyrose
  card-details-color(#ffe4e1, #000) //Black text for better visibility

.card-details-indigo
  card-details-color(#4b0082, #ffffff) //White text for better visibility

.voted
  opacity: .7
.vote-title
  display: flex
  justify-content: space-between
  font-size: 24px;
  align-items: center;
  h3
    font-size: 20px;
    font-weight: 600;
    color: #172b4d;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    padding: 10px 0;
  .js-edit-date
    align-self: center
    margin-left: 5px
    font-size: 14px;
.vote-box
   padding: 0 0 10px 35px;
.vote-result
  display: flex
.js-show-positive-votes
  cursor: pointer

.poker-voted
  opacity: .7

.poker-title
  display: flex
  justify-content: space-between
  font-size: 24px;
  align-items: center;
  h3
    font-size: 20px;
    font-weight: 600;
    color: #172b4d;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    padding: 10px 0;
  .js-edit-date
    align-self: center
    margin-left: 5px
    font-size: 14px;
.poker-box
   padding: 0 0 5px 35px;
.poker-result
  display: flex
  flex-flow: row wrap
.js-show-positive-poker-votes
  cursor: pointer

.poker-deck
  display: grid
  flex-direction: column
  text-align: center

.poker-card-result
  width: 32px
  font-size: 1em
  font-weight: bold
  padding: 4px 2px 4px 2px
  cursor: default

.winner
  font-weight: bold
  outline: #2d2d2d solid 2px

.loser
  opacity: .5

.responsive-table
  overflow-x: auto

.poker-table
  display: table
  width: 100%
  padding-top: 10px
  color: #172b4d;
.poker-table-row
  display: table-row

.poker-table-heading
  background-color: #EEE
  display: table-header-group

.poker-table-cell
  display: table-cell
  padding: 0 0 5px 2px
  border-bottom: 1px solid #d2d0d0
  text-align: center
  min-width: 45px

.poker-table-cell-who
  width: 150px
  vertical-align: middle

.poker-table-heading-left,
.poker-table-heading-right
  display: table-header-group
  font-weight: bold
  border-top: 1px solid #808080

@media (max-width: 400px)
  .poker-table-heading-right
    display: none

.poker-table-body
  display: table-row-group

.poker-table-side-left,
.poker-table-side-right
  display: inline-block

.poker-table-side-right
  padding-left: 10px

@media (max-width: 400px)
  .poker-table-side-right
    padding-left: 0px

.estimation-add
  display: block
  overflow: auto
  margin-top: 15px
  margin-bottom: 5px
  input
    display: inline-block
    float: right
    margin: auto
    margin-right: 10px
    width: 100px
  button
    display: inline-block
    float: right
    margin: auto

.poker-card
  width:48px
  height:72px
  float:left
  background:#fff
  border-radius:5px
  display:table
  box-sizing:border-box
  padding:5px
  margin:3px
  font-size:20px
  font-weight: bold
  text-shadow: #2d2d2d 1px 1px 0
  box-shadow:0 0 5px #aaaaaa
  text-align:center
  position:relative
  cursor: pointer

  .inner
    display:table-cell
    vertical-align:middle
    border-radius:5px
    overflow:hidden
    background-color: #cecece

